#[derive(Debug, Clone)]
pub enum PackageType {
    Linglong,
    Flatpak,
    Snap,
}

#[derive(Debug)]
pub struct PackageInfo {
    pub name: String,
    pub version: String,
    pub pkg_type: PackageType,
    pub installed: bool,
}

// 通用包操作 trait
pub trait PackageOps {
    fn install(&self, path: &str) -> Result<(), String>;
    fn uninstall(&self, id: &str) -> Result<(), String>;
    fn list_installed(&self) -> Vec<PackageInfo>;
}